package com.cy.dao;

import com.cy.pojo.Merch;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author qyq
 * @create 2021-03-01-14:01
 */
@Mapper
public interface MerchDao {
    List<Merch> findMerchs();

    int insertMerch(Merch merch);
    @Delete("delete from merch where id=#{id}")
    int deleteId(Integer id);

    @Select("select * from Merch where id=#{id}")
    Merch findId(Integer id);
    @Update("update match set name=#{name},code=#{code},factory=#{factory},packaging=#{packaging},price=#{price} where id=#{id}")
    int updateMerch(Merch merch);

}
